using UnityEngine;

public class UIDialog : MonoBehaviour
{
	public UILabel labelTitle;

	public UILabel labelContent;

	public UIButton btnYes;

	public UIButton btnNo;

	public UIButton btnOk;

	public UIButton bntClose;

	public void show()
	{
		Instance<AudioController>.instance.play(AudioType.Sound_dialog);
		base.gameObject.SetActiveRecursively(state: true);
	}

	public void close()
	{
		GameHelper.DismissDialog(this);
	}

	public void setContent(string content)
	{
		labelContent.text = content;
	}

	public void setTitle(string title)
	{
		labelTitle.text = title;
	}

	public void showOk()
	{
		btnOk.gameObject.SetActiveRecursively(state: true);
		btnNo.gameObject.SetActiveRecursively(state: false);
		btnYes.gameObject.SetActiveRecursively(state: false);
	}

	public void showYesNo()
	{
		btnOk.gameObject.SetActiveRecursively(state: false);
		btnNo.gameObject.SetActiveRecursively(state: true);
		btnYes.gameObject.SetActiveRecursively(state: true);
	}

	public void showCloseOnly()
	{
		btnOk.gameObject.SetActiveRecursively(state: false);
		btnNo.gameObject.SetActiveRecursively(state: false);
		btnYes.gameObject.SetActiveRecursively(state: false);
		bntClose.gameObject.SetActiveRecursively(state: true);
	}

	public void hideBtnClose()
	{
		bntClose.gameObject.SetActiveRecursively(state: false);
	}
}
